﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using SuperFox.SuperServiceReference;
using System.Collections.Generic;

namespace SuperFox
{

    public class HelpItemComparator : IEqualityComparer<TreeViewItemExtension>
    {
        public bool Compare(TreeViewItemExtension a, TreeViewItemExtension b)
        {
            if (a.HelpItem == null || b.HelpItem == null)
                return false;

            return a.HelpItem.index == b.HelpItem.index;
        }

        public bool Equals(TreeViewItemExtension a, TreeViewItemExtension b)
        {
            if (a.HelpItem == null || b.HelpItem == null)
                return false;

            return a.HelpItem.index == b.HelpItem.index;
        }

        public int GetHashCode(TreeViewItemExtension obj)
        {
            return obj.GetHashCode();
        }
    }
}
